<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<link rel="stylesheet" href="/static/css/dialog.css"/>

<div id="dormSaveDialog" class="dialog_content clearfix notAllowSelect" style="min-height: 220px">
    <div class="title dialog_title">
        <p class="iconfont icon-quanxianshenpi"></p>
        <span>新增</span>
        <i class='iconfont icon-close dialog_close' onclick='dialog_close()'></i>
    </div>
    <!--  -->
    <div class="content clearfix" style="width:530px;padding-top:20px!important;padding-bottom:20px!important;"
         id="saveTungNumContent">
        <div class="SHinput" style=" margin-left: 15px;">
            <i>*</i><span style="width: 85px">栋数:</span>
            <input type="text" id="tungNum" placeholder="请输入新增的栋数"> <br/>
            <div class="errorMsg"></div>
            <p class="iconfont icon-success" style="right:60px!important;"></p>
            <p class="iconfont icon-error" style="right:60px!important;"></p>
        </div>
        <div class="end" style="left:330px!important;bottom: -20px!important;">
            <button class="cancel" onclick="dialog_close()">取消</button>
            <button id="saveTungBtn" style="margin-left:20px;" onclick="saveTung($(this))">保存
            </button>
        </div>
    </div>

    <!--  -->
    <div class="content clearfix"
         style="display:none;width:530px;padding-top:20px!important;padding-bottom:20px!important;"
         id="saveRoomNumContent">
        <div class="SHinput" style=" margin-left: 15px;">
            <i>*</i><span style="width: 85px">房号:</span>
            <input type="text" id="roomNum" placeholder="请输入新增的房号"> <br/>
            <div class="errorMsg"></div>
            <p class="iconfont icon-success" style="right:60px!important;"></p>
            <p class="iconfont icon-error" style="right:60px!important;"></p>
        </div>
        <div class="end" style="left:330px!important;bottom: -20px!important;">
            <button class="cancel" onclick="dialog_close()">取消</button>
            <button id="saveRoomBtn" style="margin-left:20px;" onclick="saveRoom($(this))">保存
            </button>
        </div>
    </div>

    <!--  -->
    <div class="content clearfix"
         style="height:200px;display:none;width:530px;padding-top:20px!important;padding-bottom:20px!important;"
         id="saveDormContent">
        <div class="SHinput">
            <i>*</i><span>栋数/tung:</span>
            <%--<input type="text" id="tungNum" disabled="disabled" style="width: 120px;margin-right:18px;">--%>
            <div class="SHselect-father" style="width: 320px;margin-right:18px;">
                <input type="text" id="tungNumSelect" placeholder="请选择栋数" disabled="disabled"
                       style="width: 320px;margin-right:18px;margin-top:0px;">
                <input type="hidden">

                <p class="iconfont icon-jiantouxia"></p>
                <div class="SHselect-son" style="width: 320px">
                    <ul>
                    </ul>
                </div>
            </div>

        </div>
        <div class="SHinput ">
            <i>*</i><span>房号/room:</span>
            <%--<input type="text" id="tungNum" disabled="disabled" style="width: 120px;margin-right:18px;">--%>
            <div class="SHselect-father" style="width: 320px;margin-right:18px;">
                <input type="text" id="roomNumSelect" placeholder="请选择房号"  disabled="disabled"
                       style="width: 320px;margin-right:18px;margin-top:0px;">
                <input type="hidden">

                <p class="iconfont icon-jiantouxia"></p>
                <div class="SHselect-son" style="width: 320px">
                    <ul>
                    </ul>
                </div>
            </div>

        </div>
        <div class="end" style="left:330px!important;bottom: 20px!important;">
            <button class="cancel" onclick="dialog_close()">取消</button>
            <button id="saveDormBtn" style="margin-left:20px;" onclick="saveDorm()">保存
            </button>
        </div>
    </div>


</div>
<script type="text/javascript" src="/static/js/admin/collegeList.js"></script>
<script type="text/javascript" src="/static/js/idms.js"></script>

<script type="text/javascript">
    dormSaveLoad();
    setTimeout(function () {
        $(".SHselect-son").children("ul").children("li").click(function () {
            $(this).parent().parent().parent().children("input").first().val($(this).children("span").text());
            $(this).parent().parent().parent().children("input").next().val($(this).children("div").text());
            $(this).parent().parent().parent().children("input").addClass("SHselect-success");
        });
    }, 500);
</script>